Skip to content

Conversation

@sdedic
Copy link
Member

@sdedic sdedic commented Jan 20, 2025

NBLS action "run with Micronaut: dev mode" throws Internal error.

PR #7979 introduced additional parameters for .run.test, .debug.test, .run.single and .debug.single - the nestedClass parameter was however added before launchConfiguration.
The relevant part in NBLS which produce Code Lenses was not adapted.

The issue surfaces only if there are multiple project configurations in the project that provide Run/Debug action overrides; for Micronaut, the Micronaut module supplies a Project Configuration that (re) define Run action. The action is available from the editor code lens on the main class main() method, for example.
It seems that a minimal change is to change the parameters added by PR #7979 and order them after the existing ones, which allows pre-existing code to function.

I had to adapt the testAdapter.ts code that actually works with nested classes and uses the introduced parameter. There was one other usage in testAdapters but as it passed udefined to both configuration AND nestedclass, it can stay as it is.

When reviewing, please consult also the original PR code - there are 2 places that invoke the changed NBLS commands.

@sdedic sdedic added this to the NB25 milestone Jan 20, 2025
@sdedic sdedic self-assigned this Jan 20, 2025
Copy link
Contributor

@dbalek dbalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine.

@sdedic sdedic merged commit 04b2bb0 into apache:master Jan 20, 2025
32 checks passed
@dbalek dbalek deleted the lsp/run-nestedclass-fix branch January 20, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants